const express = require('express')

const router = express.Router()

const userHandle = require('./handler')


// 导入验证表单数据中间件

const expressJoi = require("@escook/express-joi")
// 导入需要的验证规则对象
const { reg_login_schema } = require('../../schema/user')
// 声明中间件
router.post('/user', expressJoi(reg_login_schema), userHandle.regUser)

router.post('/login', expressJoi(reg_login_schema), userHandle.login)

module.exports = router